home *** CD-ROM | disk | FTP | other *** search
- # Lightside, Inc. PPP and SLIP login script
- # Copyright 1995 Quarterdeck Office Systems
- # 5-9-95 CEL
-
- #define the variables we will need
-
- STRING username
- STRING password
- STRING framing
- STRING IPAddress
-
- # uncomment for debugging
- # TRACE ON
-
- # reset maximum login timeout.
- SetTimeout 90
-
- CfgGetValue "Username" username
- IF result = 0 THEN
- ABORT "ERROR: Cannot load username from Qdeck.ini."
- ENDIF
-
- CfgGetValue "Password" password
- IF result = 0 THEN
- ABORT "ERROR: Cannot load password from Qdeck.ini."
- ENDIF
-
- # get framing layer (MPPPP, MPSLIP)
- # abort with an error if we can't read the Framing setting
- CfgGetValue "Framing" framing
- IF result = 0 THEN
- ABORT "Can't read 'Framing' setting from qdeck.ini"
- ENDIF
-
- CommWaitFor "Login:" # wait for login prompt
- IF framing = "MPSLIP" THEN
- CommSend "SLIP"
- ENDIF
-
- CommSend username # send user name
- CommSend "%r" # send carriage return
-
- CommWaitFor "Password:" # wait for password prompt
- CommSend password # send password
- CommSend "%r" # send carriage return
-
- # if SLIP, we need to get the IP address
- IF framing = "MPSLIP" THEN
- PRINT "%rGetting IP address for SLIP"
- CommWaitFor ") to" # wait for string that precedes the reported IP Address
- CommReadIPAddr IPAddress # IP address should be next word
- # store the IP address
- CfgSetValue "IPAddress" IPaddress
- PRINT "%rIP Address set to ["; IPAddress; "]"
- ENDIF # end of SLIP logic
-
- END
-